<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="product" content="Metro UI CSS Framework">
    <meta name="description" content="Simple responsive css framework">
    <meta name="author" content="Sergey S. Pimenov, Ukraine, Kiev">
    <meta name="keywords" content="js, css, metro, framework, windows 8, metro ui">

    <link href="css/metro-bootstrap.css" rel="stylesheet">
    <link href="css/metro-bootstrap-responsive.css" rel="stylesheet">
    <link href="css/iconFont.css" rel="stylesheet">
    <link href="css/docs.css" rel="stylesheet">
    <link href="js/prettify/prettify.css" rel="stylesheet">
	<link href="themes/style.css" rel="stylesheet" type="text/css" />

    <!-- Load JavaScript Libraries -->
    <script src="js/jquery/jquery.min.js"></script>
    <script src="js/jquery/jquery.widget.min.js"></script>
    <script src="js/jquery/jquery.mousewheel.js"></script>
    <script src="js/prettify/prettify.js"></script>

    <!-- Metro UI CSS JavaScript plugins -->
    <script src="js/load-metro.js"></script>

    <!-- Local JavaScript -->
    <script src="js/docs.js"></script>
    <script src="js/github.info.js"></script>
	
	<!-- For Text Area -->
    <script type="text/javascript" src="scripts/jHtmlArea-0.8.js"></script>
	<link rel="Stylesheet" type="text/css" href="style/jqueryui/ui-lightness/jquery-ui-1.7.2.custom.css" />
    <link rel="Stylesheet" type="text/css" href="style/jHtmlArea.css" />

    <title>CNEMAS NAS TELKOM</title>

    <style>
    </style>
</head>
<body>
<ul class="horizontal-menu nlm">
<center><h1>:: CNEMAS NAS ::</h1></center>
<center><li><h2>COMPUTER & NETWORK EQUIPMENT MANAGEMENT SYSTEM NASIONAL</h2></li></center>
<body class="metro" style="background-color: #FFFFFF">
	<?php
    echo "<header class='bg-dark' data-load='header.php?login=".$_GET['login']."'></header>"
	?>
</body>
<form method="post">
		<table style="margin: 50px 50px 50px 120px;">
		<tr>
		<td>Judul</td>
		<td><input type="text" name="judul" class="textboxt"></td>
		</tr>
		<tr><td></br></td></tr>
		<tr>
		<td>Berita</td>
		<td>
		<script type="text/javascript">    
        // You can do this to perform a global override of any of the "default" options
        // jHtmlArea.fn.defaultOptions.css = "jHtmlArea.Editor.css";

        $(function() {
            //$("textarea").htmlarea(); // Initialize all TextArea's as jHtmlArea's with default values

            $("#txtDefaultHtmlArea").htmlarea(); // Initialize jHtmlArea's with all default values

            $("#txtCustomHtmlArea").htmlarea({
                // Override/Specify the Toolbar buttons to show
                toolbar: [
                    ["bold", "italic", "underline", "|", "forecolor"],
                    ["p", "h1", "h2", "h3", "h4", "h5", "h6"],
                    ["link", "unlink", "|", "image"],                    
                    [{
                        // This is how to add a completely custom Toolbar Button
                        css: "custom_disk_button",
                        text: "Save",
                        action: function(btn) {
                            // 'this' = jHtmlArea object
                            // 'btn' = jQuery object that represents the <A> "anchor" tag for the Toolbar Button
                            alert('SAVE!\n\n' + this.toHtmlString());
                        }
                    }]
                ],

                // Override any of the toolbarText values - these are the Alt Text / Tooltips shown
                // when the user hovers the mouse over the Toolbar Buttons
                // Here are a couple translated to German, thanks to Google Translate.
                toolbarText: $.extend({}, jHtmlArea.defaultOptions.toolbarText, {
                        "bold": "fett",
                        "italic": "kursiv",
                        "underline": "unterstreichen"
                    }),

                // Specify a specific CSS file to use for the Editor
                css: "style//jHtmlArea.Editor.css",

                // Do something once the editor has finished loading
                loaded: function() {
                    //// 'this' is equal to the jHtmlArea object
                    //alert("jHtmlArea has loaded!");
                    //this.showHTMLView(); // show the HTML view once the editor has finished loading
                }
            });
        });
    </script>
    
    <textarea id="txtDefaultHtmlArea" cols="50" rows="15" name="berita"></textarea>
		</tr>
		<tr>
		<td>
		</br></br></br>
		<input type="submit" name="submit" value="Submit" class="button">
		</td>
		</tr>
		<?php
		include 'connect.php';
		if(isset($_POST['submit'])){
			$judul=$_POST['judul'];
			$isi=$_POST['berita'];
			$sql = "INSERT INTO `cnemas`.`berita` (`judul`, `isi`) VALUES ('".$judul."', '".$isi."');";
			mysql_query($sql) or (mysql_error());
			echo "<tr><td></br></td></tr>";
			echo "<tr>Berita Tersimpan</tr>";
		}
		?>
		</table>
		
</form>
</body>